// LostFoundCategoryController.java
package com.csxy.six.controller;

import com.csxy.six.entity.LostFoundCategory;
import com.csxy.six.service.LostFoundCategoryService;
import com.csxy.six.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/categories")
public class LostFoundCategoryController {

    @Autowired
    private LostFoundCategoryService categoryService;

    @GetMapping
    public Result<List<LostFoundCategory>> getAllCategories() {
        return Result.success(categoryService.getAllCategories());
    }
}